Skip to content

fix(AzureTranslator): update SDK compatibility and API documentation - #1416

Merged
ArgoZhang merged 6 commits into
masterfrom
fix-azuretrans
Dec 5, 2026
Merged

ArgoZhang merged 6 commits into
masterfrom
fix-azuretrans

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Link issues

fixes #1415

Summary By Copilot

  • Update Azure.AI.Translation.Text handling for net6/net7 versus net8+.
  • Centralize Azure Translator client creation and required Key/Region validation.
  • Restore UTF-8 BOM for changed C# source files.
  • Add bilingual Chinese/English XML comments and regenerate package skill API references.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

SDK selection is isolated by target framework, while public method signatures remain unchanged.

Verification

  • Manual (required)
  • Automated

Executed: dotnet build src/components/BootstrapBlazor.AzureTranslator/BootstrapBlazor.AzureTranslator.csproj --no-restore — net6.0 through net11.0 succeeded with 0 warnings and 0 errors.

Packaging changes reviewed?

  • Yes
  • No
  • N/A

Package skill references were regenerated for the AzureTranslator package.

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Keep Azure Translator compatible with supported SDK versions and clarify its configuration and API documentation.

Bug Fixes:

  • Validate Azure Translator Key and Region and report a clear configuration error when either is missing.

Enhancements:

  • Support Azure Text Translation SDK APIs across target frameworks while retaining the existing public method signatures.

Documentation:

  • Add bilingual Chinese and English XML documentation for the Azure Translator options, service interface, and service registration.

@sourcery-ai

sourcery-ai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Update the Azure Translator options documentation while keeping its public configuration shape unchanged.

  • src/components/BootstrapBlazor.AzureTranslator/AzureTranslatorOption.cs L1-29 (5 small edits)

API

Document the Azure Translator service contract and its configuration-registration extension in Chinese and English.

  • src/components/BootstrapBlazor.AzureTranslator/Extensions/ServiceCollectionExtensions.cs L10-11, L16-21
  • src/components/BootstrapBlazor.AzureTranslator/Services/IAzureTranslatorService.cs L1, L10-11, L16-48

Implementation

Centralize client creation and credential validation, and adapt the multi-target translation call to the Azure SDK API available on each framework.

  • src/components/BootstrapBlazor.AzureTranslator/Services/AzureTranslatorService.cs L29-40, L81-102, L111-131 (+3 small edits)

Configuration

Update the Azure Translator project configuration for the revised SDK and target-framework compatibility.

  • src/components/BootstrapBlazor.AzureTranslator/BootstrapBlazor.AzureTranslator.csproj L4, L15 (removed lines), L18-25

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto Bot added the documentation Improvements or additions to documentation label Dec 5, 2026
@bb-auto bb-auto Bot added this to the v11.0.0 milestone Dec 5, 2026

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved by bb-auto

@ArgoZhang
ArgoZhang merged commit aea36bf into master Dec 5, 2026
3 checks passed
@sourcery-ai

sourcery-ai Bot commented Dec 5, 2026

Copy link
Copy Markdown

Linked issues

Checked at commit 5d553b4

#1415 doc(AzureTranslator): update bilingual API comments and package skill · 1 of 1 met

# Requirement Status Notes
1 Add bilingual Chinese and English XML documentation for the public API, service registration, and package skill references. ✅ Met Bilingual XML comments cover the options, translation service interface, and registration method; package-time skill documentation is generated from the updated source comments.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@ArgoZhang
ArgoZhang deleted the fix-azuretrans branch December 5, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc(AzureTranslator): update bilingual API comments and package skill

1 participant